// 分页（换页函数）
function nextPage(page, pSize) {
	if (true && document.forms[0]) {
		var url = document.forms[0].getAttribute("action");
		if (url.indexOf('?')>-1) {
			url += "&pageIndex=";
		} else {
			url += "?pageIndex=";
		}
		url = url + page + "&pageSize=" + pSize;
		document.forms[0].action = url;
		document.forms[0].submit();
	} else {
		var url = document.location+'';
		if (url.indexOf('?')>-1) {
			if (url.indexOf('index')>-1) {
				var reg = /index=\d*/g;
				url = url.replace(reg,'index=');
			} else {
				url += "&pageIndex=";
			}
		} else {
			url += "?pageIndex=";
		}
		url = url + page + "&pageSize=" + pSize;
		document.location = url;
	}
}

// 分页（调整每页显示条数）
function changeCount() {
	var value = $("#psize option:selected").val();
	debugger
	if (true && document.forms[0]) {
		var url = document.forms[0].getAttribute("action");
		if (url.indexOf('?')>-1) {
			url += "&pageIndex=";
		} else {
			url += "?pageIndex=";
		}
		url = url + "&pageSize="+value;
		document.forms[0].action = url;
		document.forms[0].submit();
	} else {
		var url = document.location+'';
		if (url.indexOf('?')>-1) {
			if (url.indexOf('index')>-1) {
				var reg = /index=\d*/g;
				url = url.replace(reg,'index=');
			} else {
				url += "&pageIndex=";
			}
		} else {
			url += "?pageIndex=";
		}
		url = url + "&pageSize="+value;
		document.location = url;
	}
}